//
//  LLPlayerContainerView.h
//  VideoPlayerProject
//
//  Created by admin on 2019/11/22.
//  Copyright © 2019 admin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVKit/AVKit.h>
///屏幕处于横屏还是竖屏播放
typedef enum : NSUInteger {
    LandscapePlayStatus,    //横屏
    VerticalPlayStatus,     //  竖屏
} ScreenStatus;


NS_ASSUME_NONNULL_BEGIN

@interface LLPlayerContainerView : UIView

@property (nonatomic, copy) NSString *videoUrlString;   // 视频播放地址

//上部操作视图
@property (nonatomic , strong) UIView *topOperationView;
//上部操作视图上的返回按钮
@property (nonatomic , strong) UIButton *backButton;
//上部操作视图上的标题，电影名字
@property (nonatomic , strong) UILabel *movieName;

//下部操作视图
@property (nonatomic , strong) UIView *bottomOperationView;
//播放时间
@property (nonatomic , strong) UILabel *playTimeLabel;
//电影总时长
@property (nonatomic , strong) UILabel *totalTimeLabel;
//播放或暂停按钮
@property (nonatomic , strong) UIButton *playButton;
//全屏或部分屏幕播放按钮
@property (nonatomic , strong) UIButton *fullScreenButton;

//播放进度
@property (nonatomic , strong) UISlider *progressSlider;
//缓冲进度
@property (nonatomic , strong) UIProgressView *progressView;

///监测处于横屏还是竖屏播放
@property (nonatomic, copy) void(^screenStatusBlock)(ScreenStatus screenStatus);
///操作视图是否隐藏了
@property (nonatomic, copy) void(^operationViewIsHiddenBlock)(BOOL isHidden);

///初始化：父视图是谁，在哪个controller中
- (instancetype)initWithFrame:(CGRect)frame superView:(UIView *)superView inViewController:(UIViewController *)viewController;

///暂停播放
- (void)pause;

///开始播放
-(void)play;


///退出播放时恢复系统原始值(声音和亮度)
- (void)restoreSystemValue;


///移除观察者
- (void)remoAllOberver;




@end

NS_ASSUME_NONNULL_END
